/*************************************************
* Title：TinyToolKit
* Author：Opportunity 
* Discribe：定义对象池中的对象
* CreateTime：2020-04-05 21:33:30
* Version：1.0
* Modify Recoder：
*************************************************/
namespace TinyToolKit.ObjectPool
{
    public class ObjectPoolItem<T>:IReference
    {
        public T Target { get; set; }
        public bool IsUsing { get; private set; }

        public void Comsume()
        {
            IsUsing = true;
        }

        public void Release()
        {
            IsUsing = false;
        }

        public void Clear()
        {
            Target = default(T);
            IsUsing = false;
        }
    }
}

